package com.xianyun.book.auth.common.connection;

import lombok.NonNull;
import me.zhyd.oauth.model.AuthUser;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service;
import org.springframework.util.MultiValueMap;
import top.dcenter.ums.security.core.oauth.entity.ConnectionData;
import top.dcenter.ums.security.core.oauth.entity.ConnectionDto;
import top.dcenter.ums.security.core.oauth.exception.RegisterUserFailureException;
import top.dcenter.ums.security.core.oauth.repository.exception.UpdateConnectionException;
import top.dcenter.ums.security.core.oauth.signup.ConnectionService;
import java.util.List;

/**
 * @author macos-zyj
 */
@Service
public class ConnectionServiceImpl implements ConnectionService {
    @Override
    public UserDetails signUp(@NonNull AuthUser authUser,@NonNull String providerId, @NonNull String encodeState)
            throws RegisterUserFailureException {
        return null;
    }

    @Override
    public void updateUserConnectionAndAuthToken(@NonNull AuthUser authUser, @NonNull ConnectionData connectionData)
            throws UpdateConnectionException {

    }

    @Override
    public void binding(@NonNull UserDetails userDetails,@NonNull AuthUser authUser,
                        @NonNull String encodeState) {

    }

    @Override
    public void unbinding(@NonNull String userId,@NonNull String providerId,
                          @NonNull String providerUserId) {

    }

    @Override
    public List<ConnectionData> findConnectionByProviderIdAndProviderUserId(@NonNull String providerId,@NonNull String providerUserId) {
        return null;
    }

    @Override
    public MultiValueMap<String, ConnectionDto> listAllConnections(@NonNull String userId) {
        return null;
    }
}
